package com.hao.springcloud.controller;

import com.hao.springcloud.entities.CommonResult;
import com.hao.springcloud.entities.Payment;
import com.hao.springcloud.service.OrderFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * TODO
 *
 * @author 97472
 * @version 1.0
 * @date 2022/1/11 16:50
 */
@RestController
@Slf4j
public class FeignOrderController {

    @Resource
    private OrderFeignService orderFeignService;

    @GetMapping("/feignOrder/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable Long id){
        return orderFeignService.getPaymentById(id);
    }
}
